import { TencentCloudApiWSTokenResponseDto } from './model/tencentCloudModel';

import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  GetWSToken = '/tencentcloud/token',
}

/**
 * @description: 调用腾讯云API获取WS Token
 */
export function getWSToken(mode: ErrorMessageMode = 'modal') {
  return defHttp.get<TencentCloudApiWSTokenResponseDto>(
    {
      url: Api.GetWSToken,
    },
    {
      errorMessageMode: mode,
    },
  );
}